import { ApiVersoin } from '@/common/enums/httpEnum'
const Url = {
  customerInfoOne: `/customer-info/one`,
  customerUpdate: `/customer/update`,
  roomInfo: `/reserve/room-info`,
  templateRentInfo: `${ApiVersoin.V4}/reserve/get-template-rent-info`,
  projectList: `/reserve/project-list`,
  signProject: `/sign/project`,

  reserveList: `${ApiVersoin.V4}/reserve/list`,
  detail: `${ApiVersoin.V4}/reserve/get-detail`,
}

// 在线预定
export const customerInfoOne = (params) => uni.$uv.http.get(Url.customerInfoOne, { params, custom: { showLoading: true } })

// 更新租户信息
export const customerUpdate = (data) => uni.$uv.http.post(Url.customerUpdate, data, { custom: { showLoading: true, showMessage: true } })

// 获取房源信息
export const roomInfo = (params) => uni.$uv.http.get(Url.roomInfo, { params, custom: { showLoading: true } })

// 在线预定
export const templateRentInfo = (params) => uni.$uv.http.get(Url.templateRentInfo, { params, custom: { showLoading: true } })

// 获取房源项目信息
export const projectList = (params) => uni.$uv.http.get(Url.projectList, { params, custom: { showLoading: true } })

// 在线签约
// 获取项目
export const signProject = (data) => uni.$uv.http.get(Url.signProject, { data, custom: { showLoading: true } })

// 预定列表
export const reserveList = (data) => uni.$uv.http.get(Url.reserveList, { data, custom: { showLoading: true } })

// 预定详情
export const detail = (data) => uni.$uv.http.get(Url.detail, { data, custom: { showLoading: true } })
